package com.tfjybj.itoo.exam.provider.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tfjybj.itoo.exam.entity.QuestionClassifyEntity;
import com.tfjybj.itoo.exam.model.QuestionClassifyModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * QuestionClassifyDao接口
 * ${base}表
 *
 * @author 李青松
 * @version 2.0.0
 * @since 2.0.0 2018-11-01 08:55:53
 */
@Repository("questionClassifyDao")
public interface QuestionClassifyDao extends BaseMapper<QuestionClassifyEntity> {

    //region 模板生成：模糊查询

    /**
     * 根据父试题分类id模糊查询questionClassify
     *
     * @param pId 父试题分类id
     * @return 模糊查询的questionClassify集合
     * @author 李青松
     * @since 2.0.0 2018-11-01 08:55:53
     */
    List<QuestionClassifyEntity> queryLikePId(@Param("pId") String pId);
    //endregion

    /* **********************************以下为非模板生成的内容********************************* */

    List<QuestionClassifyEntity> queryClassify(@Param("operator") String operator);

    List<QuestionClassifyEntity> queryTreeModel(@Param("courseId") String courseId, @Param("operator") String operator);

    List<QuestionClassifyModel> queryQuestionClassfiyByQuestiontypeid(@Param("courseid") String courseid, @Param("questiontypeid") String questiontypeid);

    List<QuestionClassifyEntity> queryByCourseId(@Param("courseId") String courseId);

    QuestionClassifyEntity queryByCourseIdAndLevel(@Param("courseId") String courseId, @Param("operator") String operator);

    QuestionClassifyEntity getByName(@Param("questionClassify") String questionClassify, @Param("courseId") String courseId, @Param("operator") String operator);

    List<QuestionClassifyEntity> getByChapter(@Param("chapter") String chapter, @Param("courseId") String courseId);

    List<QuestionClassifyModel> queryQuestoinClassfiyByCourseid(@Param("courseId") String courseid);

    List<QuestionClassifyModel> queryQuestionClass(@Param("courseId") String courseId);

    List<QuestionClassifyModel> queryQuestionClassByType(@Param("courseId") String courseId, @Param("questionTypeId") String questionTypeId);
}
